Guild icon
swift-developers-japan
開発環境, ライブラリ / swift-tensorflow
3:02 AM
3:06 AM
@swift-tensorflow import TensorFlow let tensor = Tensor<Float>(shape: [], scalars: [42]) print(tensor) (edited)
Avatar
swiftTensorflow BOT 4/27/2018 3:06 AM
42.0stderr:2018-04-27 03:07:26.171304: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX (edited)
Avatar
@swift-tensorflow
Avatar
swiftTensorflow BOT 4/27/2018 7:19 AM
Usage: @swiftTensorFlow [SWIFT_OPTIONS] `​`​`​ [Swift Code] `​`​`​
Avatar
@swift-tensorflow import TensorFlow func cube<T : FloatingPoint>(_ x: T, _ str: String) -> T { print(str) return x * x * x } let dCube_dx = #gradient(of: cube, withRespectTo: .0) let _ = cube(5, "hi") let _ = dCube_dx(5, "hi")
Avatar
swiftTensorflow BOT 4/27/2018 7:21 AM
exit status: 1 with stderr:main.swift:6:16: error: generic parameter 'T' could not be inferred let dCube_dx = #gradient(of: cube, withRespectTo: .0) ^ main.swift:2:6: note: in call to function 'cube' func cube<T : FloatingPoint>(_ x: T, _ str: String) -> T { ^
Avatar
@swift-tensorflow import Python let np = Python.import("numpy") print(np) let ary = np.array.call(with:[1,2,3]) print(ary)
Avatar
swiftTensorflow BOT 4/27/2018 7:32 AM
<module 'numpy' from '/usr/local/lib/python2.7/dist-packages/numpy/__init__.pyc'> [1 2 3]
Avatar
numpyが使える・・
7:34 AM
@swift-tensorflow import Python let np = Python.import("numpy") let ary = np.array([1,2,3]) print(ary)
Avatar
swiftTensorflow BOT 4/27/2018 7:34 AM
stderr:main.swift:3:19: error: cannot call value of non-function type 'PyValue' let ary = np.array([1,2,3]) ~~~~~~~~^
Avatar
https://github.com/tensorflow/swift/blob/master/docs/PythonInteroperability.md によると np.array([1,2,3]) でいけそうだったけどだめっぽい
swift - Swift for TensorFlow documentation repository.
Avatar
@swift-tensorflow import Python let np = Python.import("numpy") let ary = np.fooooooooooo.call(with:[1,2,3])
Avatar
swiftTensorflow BOT 4/27/2018 7:42 AM
stderr:#0 0x0000000004176bb4 PrintStackTraceSignalHandler(void*) (/usr/bin/swift+0x4176bb4) #1 0x0000000004176ef6 SignalHandler(int) (/usr/bin/swift+0x4176ef6) #2 0x00007f40648f3390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #3 0x00007f4052c014cd $S6Python7PyValueV13dynamicMemberACSS_tcig (/usr/lib/swift/linux/libswiftPython.so+0x114cd) #4 0x00007f4064d2108f #5 0x000000000108b39e llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) (/usr/bin/swift+0x108b39e) #6 0x000000000108f4c2 llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, char const* const*) (/usr/bin/swift+0x108f4c2) #7 0x00000000004f90a2 swift::RunImmediately(swift::CompilerInstance&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, swift::IRGenOptions&, swift::SILOptions const&) (/usr/bin/swift+0x4f90a2) #8 0x00000000004e12ac performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/usr/bin/swift+0x4e12ac) #9 0x00000000004dc72c swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/usr/bin/swift+0x4dc72c) #10 0x000000000048ce4d main (/usr/bin/swift+0x48ce4d) #11 0x00007f405ead4830 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20830) #12 0x000000000048a6a9 _start (/usr/bin/swift+0x48a6a9) Stack dump: 0. Program arguments: /usr/bin/swift -frontend -interpret main.swift -disable-objc-interop -I /RxSwift/.build/x86_64-unknown-linux/debug -module-name main -lRxSwift
Avatar
デスヨネー
7:44 AM
コンパイルは通ってしまう、ってのが @dynamicMemberLookup か
Avatar
omochimetaru 4/27/2018 7:45 AM
ですね
7:45 AM
Swiftがガバガバに!
Avatar
テンソル積演算子の入力はこちらをお使いください 👍 https://github.com/taketo1024/SwiftyMath/blob/master/CodeSnippets/885A162B-C94C-4085-A858-99634B46259C.codesnippet 👆これを ~/Library/Developer/Xcode/UserData/ に入れればすぐ出ます。
SwiftyMath - Pure Math in Pure Swift.
😀 2
Avatar
現時点で let ary = np.array([1,2,3]) の代わりに let ary = np.array.call(with:[1,2,3]) としなきゃいけないのは、@dynamicCallable がまだ提案中だから未実装だよと明記されていました。 https://github.com/tensorflow/swift/blob/master/docs/PythonInteroperability.md#dynamically-callable-types
swift - Swift for TensorFlow documentation repository.
Avatar
モチベーション 以下の Swift for TensorFlow のスレッドで Chris が発言した https://groups.google.com/a/tensorflow.org/forum/#!topic/swift/IQcQIOslt-I Take a look at Tensor.swift in the TensorFlow module. We implemented this wit...
👀 4
Avatar
omochimetaru 5/7/2018 3:31 AM
google/swift が活発になってきた。
3:32 AM
From mailing list discussion: https://groups.google.com/a/tensorflow.org/forum/#!topic/swift/0de3S72qMTU It would be nice to add initializers that bridge Python numpy.ndarray (as PyValue) to Swift ...
Avatar
ビルドしようとして、 tensorflow ブランチで utils/build-script -Rt して、できた swiftimport TensorFlow ができなくてハマってる。
Avatar
omochimetaru 5/7/2018 3:34 AM
そこらへんのpythonパッケージとの連携部分っていまはどういう設計なんでしょうね?
3:35 AM
普通にシステムのpythonでimport TensorFlowはできるんですか?
3:35 AM
てか、pyenvとか絡んでるとトラブルになりそう。
3:36 AM
Building Swift with TensorFlow support
3:36 AM
一応ドキュメントはあるのか
3:37 AM
utils/build-script --enable-tensorflow --release-debuginfo
3:37 AM
-Rtじゃだめっぽいですよ、enable-tensorflowっていうのをつけるらしい
3:37 AM
3:37 AM
README
Avatar
おお、そうなのか。見てなかった・・・。
3:39 AM
そこらへんのpythonパッケージとの連携部分
Swift for TensorFlow の TensorFlow は Python 噛んでないんじゃないかな?
Avatar
omochimetaru 5/7/2018 3:39 AM
たしかにそれもありえるけどどうなんだろう・・・
3:40 AM
Swift のパッケージになってる。
Avatar
omochimetaru 5/7/2018 3:41 AM
func expandingShape(at shapeIndex: Int32) -> Tensor { return #tfop("ExpandDims", handle, Tensor<Int32>(shapeIndex), Tdim: Int32.self) }
Avatar
#tfop 使って TensorFlow と連携してるけど、 Python は介在してないんじゃないかな?ちゃんと調べたわけじゃないけど。
Avatar
omochimetaru 5/7/2018 3:41 AM
このtfopがキモっぽいですね
Avatar
swift - Swift for TensorFlow project home page
3:43 AM
とりあえず utils/build-script --enable-tensorflow --release-debuginfo やってみます。
Avatar
omochimetaru 5/7/2018 3:49 AM
よくわからないけどたしかにtensorflow周りの部分はコンパイラで一級に扱ってグラフ化して、 TFのライブラリだかランタイムだかに流せる何かしらになるっぽい /// Lower the specified SIL function (which was formed by the partitioner) /// into a TensorFlow graph, and encode into a vector of bytes. /// std::vector<char> lowerTFGraph(SILFunction *fn);
3:55 AM
TFのグラフ発火は最終的にGPUやらTPUやらの呼び出しになるわけで、これある意味夢の自動GPU並列化コンパイラ技術な気がしてきた
Avatar
↓このあたり壮大なこと書いてある。 Finally, while TensorFlow is the reason we built this infrastructure, its algorithms are independent of TensorFlow itself: the same compiler transformation can extract any computation that executes asynchronously from the host program while communicating through sends and receives. This is useful and can be applied to anything that represents computation as a graph, including other ML frameworks, other kinds of accelerators (for cryptography, graphics, transcoding, etc), and general distributed systems programming models based on graph abstractions. We are interested in exploring new applications of this algorithm in the future.
👀 1
Avatar
omochimetaru 5/7/2018 3:58 AM
なるほど・・・
4:00 AM
TensforFlow流行らせるための事業だと思ってたけどコンパイラプロジェクトだと見るとすごい新しくて高度なテーマに思えてきた
Avatar
うん、 Swift for TensorFlow はかなりヤバイ技術な気がしてる。名前だけだと、一見ただの TensorFlow ラッパーに見えるけど。
4:02 AM
TensforFlow流行らせるため
それもあるんだろうけど、 Chris Lattner 的には Swift を流行らせるためもありそう。
Avatar
ビルドできてた。ちゃんと import TensorFlow もできた。
🙌 1
Avatar
omochimetaru 5/7/2018 10:24 AM
おお
Avatar
The Swift for TensorFlow project is an exciting endeavor that is a great example of the kind of expansion of Swift to more domains and applications that was enabled and envisioned by making Swift open source. For bringup reasons the Swift compil...
🙌 1
👏 1
Avatar
https://github.com/apple/swift/commits/tensorflow もう引っ越し完了してる
swift - The Swift Programming Language
Avatar
omochimetaru 5/12/2018 1:41 PM
Super excited that the Swift for TensorFlow compiler changes are moving into the main https://t.co/rqgJSq5sOm github repository: https://t.co/tcazXU1lli
Retweets
165
Likes
440
Avatar
最近 forum 見てなかったけどこの ID @Chris_Lattner3 のまま定着しちゃったの?😂
2:32 PM
もうしばらく google/swift にいた方がブランディング上はよかった気もする。
Avatar
norio_nomura 5/12/2018 3:25 PM
swift - Swift for TensorFlow project home page
Likewise, we plan to keep github/tensorflow/swift as the landing page for the project. Machine learning researchers don’t necessarily care about the ins and outs of the Swift open source project. The programming language is just an implementa...
Avatar
norio_nomura 6/4/2018 1:13 AM
swift-tensorflow-DEVELOPMENT-2018-06-01-a@dynamicCallableが使える様になったぽい。 @swift-tensorflow import TensorFlow import Python // NumPy example: let np = Python.import("numpy") // import numpy as np let a = np.arange(15).reshape(3, 5) // a = np.arange(15).reshape(3, 5) let b = np.array([6, 7, 8]) // b = np.array([6, 7, 8]) (edited)
👏 4
Avatar
swiftTensorflow BOT 6/4/2018 1:13 AM
no output (edited)
Avatar
omochimetaru 6/4/2018 1:18 AM
おーー
Avatar
久々に最新版( swift-tensorflow-DEVELOPMENT-2018-07-24-a )入れてみたら、 sudo xcode-select -s /Applications/Xcode-beta.app/ しないと実行できなくなってた。
Avatar
omochimetaru 7/25/2018 3:58 AM
WWDC後あたりからXcode-betaじゃないとビルドできなくなってるんですが
3:58 AM
あ、ビルドじゃなくて、プレビルトバイナリをインストールする場合もか。
Avatar
はい、 pre-built です。 (edited)
4:31 AM
その前にダウンロードしたのは swift-tensorflow-DEVELOPMENT-2018-06-01-a だから、「WWDC後あたりから」変わったのかも。
Avatar
2018-06-29以降Xcode 10が必要みたいね。 https://github.com/tensorflow/swift/blob/master/Installation.md#xcode
swift - Swift for TensorFlow project home page
🙏 1
Avatar
…ccurately reflect the operator’s mathematical properties and make it familiar to TensorFlow users. Currently the deprecation is a warning - when we update tensorflow/swift-models, I'll start a...
3:50 AM
これに合わせて最近自作ライブラリでも a.dotProduct(with: b) だったのを a.dot(b) に直してたんだけど・・・。
Avatar
omochimetaru 7/27/2018 3:52 AM
stdlib/public/TensorFlow/Ops.swift の 273行目に dotは残ってませんか?
3:52 AM
あ、 @available(*, renamed: "matmul(_:_:)")
3:52 AM
なんかついてた。
Avatar
正確にはまだ deprecated だと思う。
Avatar
omochimetaru 8/13/2018 2:03 AM
Note: This PR should not be merged until Python 3 support is discussed with the community. This approach for adding Python 3 support creates two pairs of CPython and Python modules: CPython2 and ...
Avatar
おお
2:08 AM
ただ、まずは↓をがんばってほしい。 https://github.com/apple/swift/pull/16980
This proposal introduces the @dynamicCallable attribute, which enables nominal types to be "callable" via a simple syntactic sugar. This is the implementation of the Swift evolution propo...
2:08 AM
返事待ちなのか。
Avatar
omochimetaru 8/13/2018 2:11 AM
dynamicCallableはswiftTFのzhengさんがやっているのか
Avatar
うん。プロポーザルも Chris Lattner の共同で
2:13 AM
一応 Swift for Tensorflow の方には前倒しで @dynamicCallable が入ってるんだけど、まだ未完成で色々問題があるっぽい。 (edited)
Avatar
omochimetaru 8/13/2018 2:14 AM
なるほど 本流向けに清書してるのか
Avatar
清書というか、コーナーケース考えたら色々やんなきゃいけないことがあって指摘されて対応してるって感じじゃないかなぁ。ちゃんと読んでないけど。 (edited)
2:16 AM
iOSDC の発表に向けて @dynamicCallable / @dynamicMemberLookup 使って scikit-learn 使ってみてるけどなかなか楽しい。
Avatar
omochimetaru 8/13/2018 2:19 AM
ほー
Avatar
omochimetaru 9/26/2018 5:09 AM
Swift for TensorFlow now has a Jupyter notebook tutorial, with latest available features like first-class autodiff on arbitrary structs, the new dataset API, and the parameter aggregate API. https://t.co/zHizoO9On7
Retweets
120
Likes
374
5:09 AM
Contribute to tensorflow/swift-tutorials development by creating an account on GitHub.
5:09 AM
Jupyterの中でSwiftでPython書いてるww
5:10 AM
func lossAndGradient(for input: Tensor<Float>, using model: IrisParameters, labels: Tensor<Int32>) -> (Float, IrisParameters) { let (loss, (_, modelGrad)) = #valueAndGradient(loss(for:using:labels:), wrt: .0, .1)(input, model, labels) return (loss, modelGrad) }
5:10 AM
これめちゃくちゃ面白いなw gradientを言語機能で書く
Avatar
これ Python は最初のデータ取ってくるとこと matplotlib だけで、後は Swift じゃない? Tensor とかも。
Avatar
omochimetaru 9/26/2018 5:49 AM
本当だ
5:49 AM
ダウンロードはURLSessionだと大変だから?
Avatar
CSV の読み込みとかはともかく、確かにダウンロードは Foundation でもできそうな?🤔
Avatar
omochimetaru 9/26/2018 5:51 AM
たんにまぜこぜサンプルとしてそう書いただけですかね
Avatar
読み手が Python 使いなのを想定してるのかも。
Avatar
まだ確定ではないですが、7/12にSwift for tensorflowのGooglerが日本に来るそうで、日本の開発者に会いたいらしいです。Googleからミートアップを開催できないかという相談をもらいました。規模感しりたいので、開催されたら参加する人リアクションもらえますか?
😍 4
10:31 AM
わいわいswiftcとマージするとかでも可能です。
Avatar
omochimetaru 6/27/2019 3:41 PM
🤚
Avatar
本件7/10(水)になりそうですが、皆さん来れそうですか?ある程度集まりそうなら開催になるかなぁと
Avatar
omochimetaru 7/2/2019 12:33 PM
行きます 夕方ですよね
Avatar
Swift for tensorflow meetupをメルカリで開催します!よろしくお願いします! https://twitter.com/d_date/status/1146322419574960129?s=20
Swift for tensorflow meetup #1 has been published! https://t.co/w1es9W3mVV #s4tf
7:42 AM
# Swift for tensorflow Google AI TeamからSwift for tensorflowのエンジニアが来日するので、meetupを開催します。 ## こんな人に来てほしい! * Swift for tensorflowに興味がある * MLIRに感銘をうけた * 日頃tensorflowを使っ...
Avatar
GooglerのEugeneさんはScalaのバックグラウンドも持ってそう Eugene Burmako is working on Swift for TensorFlow at Google. Before joining Google, he made major contributions to Scala at EPFL and Twitter, founding Reasonable Scala compiler, Scalameta and Scala macros. Eugene loves compilers, and his mission is to change the world with compiler technology
Avatar
ubuntu上にS4TF環境構築してましたけどswift-jupyterのdockerオプションがめちゃくちゃ楽ですね。 https://github.com/google/swift-jupyter#option-3-using-the-docker-container GPUも普通に使えるのでこれで頑張れそう……
Contribute to google/swift-jupyter development by creating an account on GitHub.
Avatar
swift-models/MNIST走らせてみてるんですが凄まじくメモリ食いますね…… GPUだとOOM CPUだとスワップ30GB jupyter特有の問題があるんだろうか。
Avatar
import TensorFlow let ten: Tensor<Float> = [0, 0.3, 0.5, 0.7, 1.0] print(sigmoid(ten)) print(1 / (1 + exp(-ten))) for i in 0..<5 { print("###\(ten[i])") print(gradient(of: sigmoid)(ten[i])) print(gradient(of: { 1 / (1 + exp(-$0)) })(ten[i])) } [ 0.5, 0.5744425, 0.6224593, 0.66818774, 0.7310586] [ 0.5, 0.5744425, 0.62245935, 0.66818774, 0.7310586] ###0.0 0.0 0.25 ###0.3 0.21000001 0.24445829 ###0.5 0.25 0.23500371 ###0.7 0.21000001 0.22171286 ###1.0 0.0 0.19661197
8:22 AM
colabで試したんですがsigmoidの微分値がおかしい?
Avatar
omochimetaru 7/9/2019 10:40 AM
静的に近似微分関数が与えられてる場合もあるからそういうのかな?
Avatar
print(gradient(of: sigmoid)(sigmoid(ten[i]))) だと正しいみたいです。 出力値を渡す仕様なのかと思いましたがsqrtとかは入力値で微分値が出るんですよね
Avatar
omochimetaru 7/9/2019 10:49 AM
うーん?
Avatar
import TensorFlow var x: Tensor<Float> = [1.0] print(gradient(of: { sigmoid($0) })(x[0])) // 0.0 -> wrong? print(gradient(of: sigmoid)(sigmoid(x[0]))) // 0.19... -> correct? print(gradient(of: sqrt)(x[0])) // 0.5 -> correct
Avatar
omochimetaru 7/9/2019 10:50 AM
てか#つかないんだっけ?
Avatar
今のはつかないみたいですね。
10:51 AM
いろいろ仕様変更があったみたいで古めの資料が参考にできないことが多いです……
Avatar
omochimetaru 7/9/2019 10:52 AM
ふーむ
Avatar
https://qiita.com/mitsuharu_e/items/68f51704635c43f3f45a 検索上位のこれもコンパイルするためにいろいろ変更が必要でした。

はじめに

Python の機械学習向け数値計算ライブラリ TensorFlow を Swift でも使用することができる [Swift for TensorFlow](https://www.tensorflow.org/swi...
Avatar
↑に書いたsqrtですけど1.0で確認したら出力値も1.0だから意味ないですね。 0.5で試したらやっぱり出力値を入れるのが正しいみたいでした。
Avatar
sigmoidとその微分の実装がここ https://github.com/tensorflow/swift-apis/blob/323b5640c48822340f2f5410d6bff51972fc9f45/Sources/TensorFlow/Operators/Math.swift#L970-L975 /// Returns the sigmoid of the specified tensor element-wise. /// Specifically, computes `1 / (1 + exp(-x))`. @inlinable @differentiable(vjp: _vjpSigmoid) public func sigmoid<T: TensorFlowFloatingPoint>(_ x: Tensor<T>) -> Tensor<T> { Raw.sigmoid(x) } @inlinable internal func _vjpSigmoid<T: TensorFlowFloatingPoint>( _ x: Tensor<T> ) -> (Tensor<T>, (Tensor<T>) -> Tensor<T>) { (sigmoid(x), { v in Raw.sigmoidGrad(x, dy: v) }) } Raw.sigmoidGradがこれなのでyを渡すべきところでxを渡してる? https://raw.githubusercontent.com/tensorflow/swift-apis/master/Sources/TensorFlow/Bindings/RawOpsGenerated.swift /// Computes the gradient of the sigmoid of `x` wrt its input. /// /// Specifically, `grad = dy * y * (1 - y)`, where `y = sigmoid(x)`, and /// `dy` is the corresponding input gradient. @inlinable @inline(__always) public static func sigmoidGrad<T: FloatingPoint & TensorFlowScalar>( _ y: Tensor<T>, dy: Tensor<T> ) -> Tensor<T> (edited)
Swift for TensorFlow Deep Learning Library. Contribute to tensorflow/swift-apis development by creating an account on GitHub.
Avatar
vjpがなんの略かわからないのでわかる方いたら教えていただきたいです。
Avatar
ググったらvector jacobian productがヒットしましたね
😮 2
Avatar
PR出してコードは大丈夫そうだけど既存テストがコケてて面倒なことになってきた。 https://github.com/tensorflow/swift-apis/pull/341
I tried the code below on colab. import TensorFlow @differentiable public func mysigmoid&lt;T: TensorFlowFloatingPoint&gt;(_ x: Tensor&lt;T&gt;) -&gt; Tensor&lt;T&gt; {...
Avatar
GANのサンプルをマージしてもらいました✌ https://github.com/tensorflow/swift-models/tree/master/GAN
Models and examples built with Swift for TensorFlow - tensorflow/swift-models
👏 3
Avatar
omochimetaru 7/26/2019 2:18 PM
すご!
Avatar
内容は大したことないです。
Avatar
One of the efforts of the Swift for TensorFlow project has been to explore adding features like Automatic Differentiation to the Swift language. This is a powerful capability that can significantly enrich Swift’s potential as a programming language for scientific computing...
Avatar
とりあえずマージしつつスイッチ切ってレビューにかけてくのね
Avatar
機能デカすぎてmasterとの乖離が大きいって話なんかな
Avatar
S4TFで使うためにTensorBoardのwriterをpure swiftで書いてたんですがPNGエンコードとか必要な箇所が出てきて面倒になってきた…… クロスプラットフォームの画像処理ライブラリの決定版が待ち望まれる。
Avatar
omochimetaru 1/18/2020 3:39 PM
libMagickWandはビルドの相性が悪いからlibPngとlibJpegをSwiftから呼び出すのがいいんじゃないかしら
Avatar
libpngの選択肢ありましたね。実はいつもstb_image使ってて使用したことがないです。
3:45 PM
stb_image_writeもバッファに書き出せるっぽいんですが関数ポインタが出てきてウッとなってしまいました。
3:46 PM
個人的に使用する範囲だとあとヒストグラムプロットもやりたいんですが参考にしてるtensorboardXはnumpyの実装使っててここも自前で頑張る必要がありそう。
Avatar
omochimetaru 1/18/2020 3:47 PM
まあstd_imageもポータビリティという意味では良さそう
3:48 PM
オンメモリなデコードがしたいならstb_image_writeのコード読み解けばええんちゃうか
3:48 PM
それかファイルポインタしかなくても
3:48 PM
fmemopenで
3:49 PM
FILE* に見えるメモリは使えるよ
Avatar
stb_image_writeのインターフェースはファイルパスを取るのでそれだとだめなんですよね。
3:50 PM
https://github.com/nothings/stb/blob/master/stb_image_write.h#L45-L62 説明されてるインターフェースはこれだけ
stb single-file public domain libraries for C/C++. Contribute to nothings/stb development by creating an account on GitHub.
Avatar
画像かけるようになりました✌️ libpngじゃなくて軽量なLodePNGを選びました。 https://github.com/t-ae/tensorboardS
Contribute to t-ae/tensorboardS development by creating an account on GitHub.
Avatar
omochimetaru 2/12/2021 7:38 PM
I agree with this. While it is interesting that you've reduced the cost of these in a specific case, we shouldn't have codegen of a core language feature rely on heroic runtime implementation, and having compilation be fragile w.r.t. number of loop iterations or execution path seems unacceptable. We need guaranteed correctness out of core lang...
7:38 PM
xanderdunn 14m The Google Brain team just announced that Swift for Tensorflow is being sunset 6. The repos have been archived and its team members are being transitioned to new projects. :frowning_face:
7:39 PM
Swift for TensorFlow. Contribute to tensorflow/swift development by creating an account on GitHub.
7:40 PM
Swift for TensorFlow終了のお知らせ・・・
😇 4
😭 3
Avatar
Kishikawa Katsumi 2/12/2021 11:39 PM
相変わらずわかってないGoogleって感じだ😡これからおもしろくなるところなのに。
Avatar
メンバーの方が「派生プロジェクトは開発が続けられるし、フォークしてコミュニティ主導で開発を続ける分には止めはしないよ」という感じのことを書いていますが、確実に下火にはなるでしょうね... https://github.com/tensorflow/swift/issues/609#issuecomment-778444848
Hello, Can you give this project to community so it's no longer Google owned (the repo and contributions etc) since it's shut down by Google I think?
Avatar
omochimetaru 2/13/2021 2:37 AM
そうですよねえ、自動微分機能の本家採用も進んでるのに・・・ (edited)
Avatar
treastrain / Tanaka.R 3/23/2021 12:38 PM
これまで Google Colab で使えていたはずの Swift、私の環境では !jupyter-kernelspec list で Swift が表示されなくなってしまったのですが、他の皆さんはいかがでしょうか…。 https://twitter.com/treastrain/status/1374339335407894531
【悲報】 Google Colab から Swift が消滅したことを確認。 Python 2、Python 3、R のみに…。
😇 2
😢 3
Exported 152 message(s)
Timezone: UTC+0